/*
 * @Date: 2022-12-21 12:52:06
 * @LastEditTime: 2023-05-10 18:24:05
 * @FilePath: /liveness/src/common/ts/init.ts
 * 介绍:项目初始化
 */
import { unitPx } from "@@/utils/tools/css";

function resetRem() {
  const htmlDom = document.documentElement;
  if (htmlDom.clientWidth < htmlDom.clientWidth * 1.5)
    return (htmlDom.style.fontSize = unitPx(htmlDom.clientWidth / 750));
  htmlDom.style.fontSize = unitPx(0.5);
}

export function eventResetRem() {
  resetRem();
  return window.addEventListener("resize", resetRem);
}
